package demo;

import java.awt.GraphicsEnvironment;
import java.util.Arrays;

public class ObtainSystemFontst {

	/**
	 * 
[Aharoni, Andalus, Angsana New, AngsanaUPC, Aparajita, Arabic Typesetting, Arial, Arial Black, 
Arimo, Batang, BatangChe, Browallia New, BrowalliaUPC, Calibri, Calibri Light, Cambria, Cambria Math, 
Candara, Charis SIL, Comic Sans MS, Consolas, Constantia, Corbel, Cordia New, CordiaUPC, Courier New, 
DaunPenh, David, DejaVu Sans, DejaVu Sans Condensed, DejaVu Sans Light, DejaVu Sans Mono, DejaVu Serif, 
DejaVu Serif Condensed, DFKai-SB, Dialog, DialogInput, DilleniaUPC, DokChampa, Dotum, DotumChe, Ebrima, 
Estrangelo Edessa, EucrosiaUPC, Euphemia, Franklin Gothic Medium, FrankRuehl, FreesiaUPC, Gabriola, Gautami, 
Gentium Basic, Gentium Book Basic, Georgia, Gisha, Gulim, GulimChe, Gungsuh, GungsuhChe, Impact, IrisUPC, 
Iskoola Pota, JasmineUPC, Kalinga, Kartika, Khmer UI, KodchiangUPC, Kokila, Lao UI, Latha, Leelawadee,
 Levenim MT, LilyUPC, Lucida Bright, Lucida Console, Lucida Sans, Lucida Sans Typewriter,
  Lucida Sans Unicode, Malgun Gothic, Mangal, Marlett, Meiryo, Meiryo UI, Microsoft Himalaya, 
  Microsoft JhengHei, Microsoft New Tai Lue, Microsoft PhagsPa, Microsoft Sans Serif, 
  Microsoft Tai Le, Microsoft Uighur, Microsoft Yi Baiti, MingLiU, MingLiU-ExtB, MingLiU_HKSCS, 
  MingLiU_HKSCS-ExtB, Miriam, Miriam Fixed, Mongolian Baiti, Monospaced, MoolBoran, MS Gothic,
   MS Mincho, MS PGothic, MS PMincho, MS UI Gothic, MT Extra, MV Boli, Narkisim, Nyala, OpenSymbol, 
   Palatino Linotype, Plantagenet Cherokee, PMingLiU, PMingLiU-ExtB, Raavi, Rod, Sakkal Majalla,
    SansSerif, Segoe Print, Segoe Script, Segoe UI, Segoe UI Light, Segoe UI Semibold, Segoe UI Symbol, 
    Serif, Shonar Bangla, Shruti, Simplified Arabic, Simplified Arabic Fixed, SimSun-ExtB, Sylfaen,
     Symbol, Tahoma, Times New Roman, Traditional Arabic, Trebuchet MS, Tunga, Utsaah, Vani, Verdana, 
     Vijaya, Vrinda, Webdings, Wingdings, 仿宋, 宋体, 微软雅黑, 新宋体, 楷体, 黑体]

	 * 
	 * @param args
	 */
	public static void main(String[] args) {
		String[] fontNames = null;
		GraphicsEnvironment environment = GraphicsEnvironment.getLocalGraphicsEnvironment();
		fontNames = environment.getAvailableFontFamilyNames();// 获取系统字体
		// Font[] fonts = environment.getAllFonts();
		if(null != fontNames){
			System.out.println( Arrays.toString(fontNames) );
		}
	}
	
}
